home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _F61F98376090463D8648F3007E1F779D < prev    next >
Encoding:
Text File  |  2004-01-06  |  6.4 KB  |  184 lines

  1. --------------------------------------------------
  2. --    Created By: Kirill
  3. --   Description: <short_description>
  4. --------------------------
  5. --
  6.  
  7. AIBehaviour.MutantScoutRedIdle = {
  8.     Name = "MutantScoutRedIdle",
  9.     
  10.  
  11.     -- SYSTEM EVENTS            -----
  12.     ---------------------------------------------
  13.     OnSelected = function( self, entity )    
  14.     end,
  15.     ---------------------------------------------
  16.     OnSpawn = function( self, entity )
  17.         -- called when enemy spawned or reset
  18.     end,
  19.     ---------------------------------------------
  20.     OnActivate = function( self, entity )
  21.         -- called when enemy receives an activate event (from a trigger, for example)
  22.     end,
  23.     ---------------------------------------------
  24.     OnNoTarget = function( self, entity )
  25.         -- called when the enemy stops having an attention target
  26.     end,
  27.     ---------------------------------------------
  28.     OnPlayerSeen = function( self, entity, fDistance )
  29.         AI:Signal(SIGNALFILTER_SUPERGROUP,1,"MEMBER_CONTACT",entity.id);
  30.         -- called when the enemy sees a living player
  31.     end,
  32.     ---------------------------------------------
  33.     OnEnemySeen = function( self, entity )
  34.         -- called when the enemy sees a foe which is not a living player
  35.     end,
  36.     ---------------------------------------------
  37.     OnFriendSeen = function( self, entity )
  38.         -- called when the enemy sees a friendly target
  39.     end,
  40.     ---------------------------------------------
  41.     OnDeadBodySeen = function( self, entity )
  42.         -- called when the enemy a dead body
  43.     end,
  44.     ---------------------------------------------
  45.     OnEnemyMemory = function( self, entity )
  46.         -- called when the enemy can no longer see its foe, but remembers where it saw it last
  47.     end,
  48.     ---------------------------------------------
  49.     OnInterestingSoundHeard = function( self, entity )
  50.         -- called when the enemy hears an interesting sound
  51.     end,
  52.     ---------------------------------------------
  53.     OnThreateningSoundHeard = function( self, entity )
  54.         -- called when the enemy hears a scary sound
  55.     end,
  56.     ---------------------------------------------
  57.     OnReload = function( self, entity )
  58.         -- called when the enemy goes into automatic reload after its clip is empty
  59.     end,
  60.     ---------------------------------------------
  61.     OnGroupMemberDied = function( self, entity )
  62.         -- called when a member of the group dies
  63.     end,
  64.     ---------------------------------------------
  65.     OnGroupMemberDiedNearest = function( self, entity, sender )
  66.         -- called when a member of the group dies
  67.         AIBehaviour.DEFAULT:OnGroupMemberDiedNearest(entity,sender);
  68.     end,
  69.     ---------------------------------------------
  70.     OnNoHidingPlace = function( self, entity, sender )
  71.         -- called when no hiding place can be found with the specified parameters
  72.     end,    
  73.     ---------------------------------------------
  74.     OnReceivingDamage = function ( self, entity, sender)
  75.         -- called when the enemy is damaged    
  76.         if (entity.Covering) then
  77.             entity:SelectPipe(0,"scout_cover_NOW");
  78.         end
  79.     end,
  80.     ---------------------------------------------
  81.     OnCoverRequested = function ( self, entity, sender)
  82.         -- called when the enemy is damaged
  83.     end,
  84.     ---------------------------------------------
  85.     OnBulletRain = function ( self, entity, sender)
  86.         -- called when the enemy is damaged
  87.     end,
  88.  
  89.  
  90.  
  91.     SCOUT_NORMAL_ATTACK = function (self, entity, sender)
  92.         if (entity == sender) then
  93.             local rnd = random(1,10);
  94.             if (rnd>5) then
  95.                 entity:SelectPipe(0,"cover_coverleft");
  96.             else
  97.                 entity:SelectPipe(0,"cover_coverright");
  98.             end
  99.         end
  100.     end,
  101.  
  102.  
  103.     SELECT_RED =  function (self, entity, sender)
  104.     end,
  105.  
  106.  
  107.     SELECT_BLACK = function (self, entity, sender)
  108.  
  109.     end,
  110.     -- GROUP SIGNALS
  111.     ---------------------------------------------    
  112.     FORM_RED = function (self, entity, sender)
  113.         -- the team leader wants everyone to keep formation
  114.         entity:SelectPipe(0,"scout_form");
  115.     end,
  116.     ---------------------------------------------    
  117.     FORM_BLACK = function (self, entity, sender)
  118.         -- the team leader wants everyone to keep formation
  119.     end,
  120.     ---------------------------------------------    
  121.     KEEP_FORMATION = function (self, entity, sender)
  122.         -- the team leader wants everyone to keep formation
  123.     end,
  124.     ---------------------------------------------    
  125.     BREAK_FORMATION = function (self, entity, sender)
  126.         -- the team can split
  127.         entity:SelectPipe(0,"scout_scramble");
  128.     end,
  129.     ---------------------------------------------    
  130.     SINGLE_GO = function (self, entity, sender)
  131.         -- the team leader has instructed this group member to approach the enemy
  132.     end,
  133.     ---------------------------------------------    
  134.     GROUP_COVER = function (self, entity, sender)
  135.         -- the team leader has instructed this group member to cover his friends
  136.     end,
  137.     ---------------------------------------------    
  138.     RED_IN_POSITION = function (self, entity, sender)
  139.         -- some member of the group is safely in position
  140.         if (entity == sender) then
  141.             entity.Covering = 1;
  142.             local rnd = random(1,10);
  143.             if (rnd>5) then
  144.                 entity:SelectPipe(0,"cover_coverleft");
  145.             else
  146.                 entity:SelectPipe(0,"cover_coverright");
  147.             end
  148.         end
  149.     end,
  150.     ---------------------------------------------    
  151.     BLACK_IN_POSITION = function (self, entity, sender)
  152.         -- some member of the group is safely in position
  153.     end,
  154.     ---------------------------------------------    
  155.     GROUP_SPLIT = function (self, entity, sender)
  156.         -- team leader instructs group to split
  157.     end,
  158.     ---------------------------------------------    
  159.     PHASE_RED_ATTACK = function (self, entity, sender)
  160.         -- team leader instructs red team to attack
  161.         entity.Covering = nil;
  162.         entity:SelectPipe(0,"red_scout_attack");
  163.     end,
  164.     ---------------------------------------------    
  165.     PHASE_BLACK_ATTACK = function (self, entity, sender)
  166.         -- team leader instructs black team to attack
  167.     end,
  168.     ---------------------------------------------    
  169.     GROUP_MERGE = function (self, entity, sender)
  170.         -- team leader instructs groups to merge into a team again
  171.     end,
  172.     ---------------------------------------------    
  173.     CLOSE_IN_PHASE = function (self, entity, sender)
  174.         -- team leader instructs groups to initiate part one of assault fire maneuver
  175.     end,
  176.     ---------------------------------------------    
  177.     ASSAULT_PHASE = function (self, entity, sender)
  178.         -- team leader instructs groups to initiate part one of assault fire maneuver
  179.     end,
  180.     ---------------------------------------------    
  181.     GROUP_NEUTRALISED = function (self, entity, sender)
  182.         -- team leader instructs groups to initiate part one of assault fire maneuver
  183.     end,
  184. }